package com.idp.common.error;

import com.idp.common.enums.MessageEnum;

/**
 * 自定义系统异常
 * @author king
 */
public class SystemException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private String code;
	private String message;

	public SystemException(String message) {
		this.code = "10001";
		this.message = message;
	}

	public SystemException(MessageEnum messageEnum) {
		this.code = "10001";
		this.message = messageEnum.message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}


}
